<template>
	<view class="body-view">

		<view class="head-box" :class="topNav1.class" :style="topNav.style">
			<!-- 使用scroll-view实现tabs滑动切换 -->
			<view class="body-view-scroll">
				<image class="body-image" src="/static/logo.png"></image>

				<!-- 	<navigator url="/pages/search/search">
					<uni-icons type="search" size="28" color="#ff0000"></uni-icons>
				</navigator> -->
				<view class="uni-mt-10" @click="searchTop">
					<view style="margin-top: 15rpx;">
						<uni-icons type="fire-filled" size="30" color="#ff0000"></uni-icons>
					</view>
					<view style="height: 60rpx;width: 100%; line-height: 60rpx;">
						<swiper style="height: 100%;width: 100%;" circular autoplay vertical="true">
							<swiper-item v-for="(item , index) in swiperListAImg">
								<view
									style="height: 100%; overflow: hidden; text-overflow: ellipsis;white-space: nowrap;">
									{{item?.name}}
								</view>
							</swiper-item>
						</swiper>
					</view>



				</view>

			</view>

			<!-- 头部导航栏 -->
			<scroll-view class="top-menu-view" scroll-x="true" scroll-with-animation :scroll-left="scrollLeft">
				<view class="menu-topic-view" v-for="(item,index) in collectioNavValue" :id="'tabNum'+item?.id"
					:key="index" @click="swichMenu(index)">
					<view :class="currentTab==index ? 'menu-topic-act' : 'menu-topic'">
						<text class="menu-topic-text">{{item?.name}}</text>
						<view class="menu-topic-bottom">
							<view class="menu-topic-bottom-color"></view>
						</view>
					</view>
				</view>
			</scroll-view>

		</view>

		<!-- 推荐 -->
		<scroll-view v-if="currentTab == 0" @scroll="SwiperScrollTop" @scrolltolower="onBottumLoadingA"
			class="swiper-topic-list" scroll-y="true">
			<view class="swiper-item">
				<!-- 轮播图 -->
				<my-swiper :list="swiperListAImg" :options="swiperOptions" />

				<!-- 观看记录第一第二 -->
				<view v-if="WatchSelectImgvalue" class="image-eight" style="padding-bottom: 20rpx;">
					<my-img-x v-for="item in WatchSelectImgvalue" :images="item?.collection[0]?.imageUrl"
						:tags="item?.collection[0]?.tags" :name="item?.collection[0]?.name" biao="正在追看"
						:urlId="item?.collection[0]?.id" :key="item?.collection[0]?.id"></my-img-x>
				</view>

				<!-- 用户人性推荐 -->
				<view class="image-eight" style="padding-top: 0; padding-bottom: 0rpx;">
					<my-img-x v-for="item in UserABannerValue" :images="item?.imageUrl" :tags="item?.tags"
						:name="item?.name" :bifen="item?.bifen" :biao="item?.biao" :key="item?.id"
						:episode="item?.episode" :episodes="item?.episodes" :urlId="item?.id"></my-img-x>
				</view>

				<!-- 必看·爆款 第一波 -->
				<view v-for="(item , index ) in SelectionSelectAvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArray[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArray[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>


				<!-- 带小图的轮播图 -->
				<view style="width: 100%;">
					<imgsBanner-tag :imgList='swiperimgsBannerValue' duration='500' interval="5000"
						:isShowSmallImgs='true' customizeDisplayField='url'></imgsBanner-tag>
				</view>


				<!-- 必看·爆款 第二波 -->
				<view v-for="(item , index ) in SelectionSelectBvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayB[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayB[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>


				<!-- 必看·爆款 第三波 -->
				<view v-for="(item , index ) in SelectionSelectCvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayC[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayC[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>

				<!-- 最后底部触发 -->
				<view class="image-eight" style="padding-bottom: 20rpx;">
					<my-img-y v-for="item in lastVideoAValue" :key="item?.id" :urlId="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:sort="item?.type"></my-img-y>
				</view>
			</view>


		</scroll-view>



		<!-- 电影 -->
		<scroll-view v-if="currentTab == 1" @scroll="SwiperScrollTop" @scrolltolower="onBottumLoadingB"
			class="swiper-topic-list" scroll-y="true">
			<view class="swiper-item">
				<!-- 轮播图 -->
				<my-swiper :list="swiperListBImg" :options="swiperOptions" />

				<!-- 导航 -->
				<my-scroll-navbar></my-scroll-navbar>

				<!-- 今日推荐·即将上线 -->
				<max-title-min title="今日新片推荐" url="/pages/tags/tags" text="最新" icon="calendar-filled"></max-title-min>
				<view class="image-eight-Three">
					<my-img-y-Three class="item" v-for="item in newDateDaysA" :key="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:urlId="item?.id"></my-img-y-Three>
				</view>


				<!-- 用户人性推荐 -->
				<view class="image-eight" style="padding-top: 0; padding-bottom: 10rpx;">
					<my-img-x v-for="item in UserBBannerValue" :images="item?.imageUrl" :tags="item?.tags"
						:name="item?.name" :bifen="item?.bifen" :biao="item?.biao" :key="item?.id"
						:episode="item?.episode" :episodes="item?.episodes" :urlId="item?.id"></my-img-x>
				</view>


				<!-- 必看·爆款 第一波 -->
				<view v-for="(item , index ) in SelectionSelectAavalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArraya[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArraya[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>


				<!-- 筛选神奇 -->
				<view>
					<max-title-min style="padding-bottom: 0;" title="筛选神奇" text="更多"></max-title-min>
					<my-scroll-navbar @TagIndex="tagsClick" :list="collectionTagsValue" :isNav="false"
						:isIcon="false"></my-scroll-navbar>
					<my-scroll-navbar @TagIndex="yearClick" :list="collectionYearValue" :isNav="false"
						:isIcon="false"></my-scroll-navbar>
					<my-scroll-navbar @TagIndex="yurtClick" :list="collectionYurtValue" :isNav="false"
						:isIcon="false"></my-scroll-navbar>
					<view style="padding-top: 30rpx;" class="image-eight-Three">
						<my-img-y-Three class="item" v-for="item in tagsYearYurtValue"
							:images="item?.collection[0]?.imageUrl" :tags="item?.collection[0]?.tags"
							:name="item?.collection[0]?.name" :bifen="item?.collection[0]?.bifen"
							:biao="item?.collection[0]?.biao" :urlId="item?.collection[0]?.id"></my-img-y-Three>
					</view>
				</view>


				<!-- 必看·爆款 第二波 -->
				<view v-for="(item , index ) in SelectionSelectBbvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayBb[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayBb[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>
				</view>


				<!-- 带小图的轮播图 -->
				<view style="width: 100%;">
					<imgsBanner-tag :imgList='swiperimgsBannerBValue' duration='500' interval="5000"
						:isShowSmallImgs='true' customizeDisplayField='url'></imgsBanner-tag>
				</view>

				<!-- 必看·爆款 第三波 -->
				<view v-for="(item , index ) in SelectionSelectCcvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayCc[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayCc[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>

				<!-- 最后底部触发 -->
				<view class="image-eight" style="padding-bottom: 20rpx;">
					<my-img-y v-for="item in lastVideoBValue" :key="item?.id" :urlId="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:sort="item?.type"></my-img-y>
				</view>

			</view>


		</scroll-view>

		<!-- 剧集 -->

		<scroll-view v-if="currentTab == 2" @scroll="SwiperScrollTop" @scrolltolower="onBottumLoadingC"
			class="swiper-topic-list" scroll-y="true">

			<view class="swiper-item">
				<!-- 轮播图 -->
				<my-swiper :list="swiperListCImg" :options="swiperOptions" />

				<!-- 导航 -->
				<my-scroll-navbar></my-scroll-navbar>

				<!-- 今日推荐·即将上线 -->
				<max-title-min title="今日新片推荐" url="/pages/tags/tags" text="最新" icon="calendar-filled"></max-title-min>
				<view class="image-eight-Three">
					<my-img-y-Three class="item" v-for="item in newDateDaysB" :key="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:episode="item?.episode" :episodes="item?.episodes" :urlId="item?.id"></my-img-y-Three>
				</view>


				<!-- 用户人性推荐 -->
				<view class="image-eight" style="padding-top: 0; padding-bottom: 10rpx;">
					<my-img-x v-for="item in UserCBannerValue" :images="item?.imageUrl" :tags="item?.tags"
						:name="item?.name" :bifen="item?.bifen" :biao="item?.biao" :key="item?.id"
						:episode="item?.episode" :episodes="item?.episodes" :urlId="item?.id"></my-img-x>
				</view>


				<!-- 必看·爆款 第一波 -->
				<view v-for="(item , index ) in SelectionSelectCavalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayCa[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayCa[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>


				<!-- 筛选神奇 -->
				<view>
					<max-title-min style="padding-bottom: 0;" title="筛选神奇" text="更多"></max-title-min>
					<my-scroll-navbar @TagIndex="tagsClickB" :list="collectionTagsValue" :isNav="false"
						:isIcon="false"></my-scroll-navbar>
					<my-scroll-navbar @TagIndex="yearClickB" :list="collectionYearValue" :isNav="false"
						:isIcon="false"></my-scroll-navbar>
					<my-scroll-navbar @TagIndex="yurtClickB" :list="collectionYurtValue" :isNav="false"
						:isIcon="false"></my-scroll-navbar>
					<view style="padding-top: 30rpx;" class="image-eight-Three">
						<my-img-y-Three class="item" v-for="item in tagsYearYurtValueB"
							:images="item?.collection[0]?.imageUrl" :tags="item?.collection[0]?.tags"
							:name="item?.collection[0]?.name" :bifen="item?.collection[0]?.bifen"
							:biao="item?.collection[0]?.biao" :urlId="item?.collection[0]?.id"
							:episode="item?.collection[0]?.episode"
							:episodes="item?.collection[0]?.episodes"></my-img-y-Three>
					</view>
				</view>


				<!-- 必看·爆款 第二波 -->
				<view v-for="(item , index ) in SelectionSelectCbvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayCb[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayCb[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>
				</view>


				<!-- 带小图的轮播图 -->
				<view style="width: 100%;">
					<imgsBanner-tag :imgList='swiperimgsBannerCValue' duration='500' interval="5000"
						:isShowSmallImgs='true' customizeDisplayField='url'></imgsBanner-tag>
				</view>

				<!-- 必看·爆款 第三波 -->
				<view v-for="(item , index ) in SelectionSelectCccvalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayCcc[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayCcc[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>

				<!-- 最后底部触发 -->
				<view class="image-eight" style="padding-bottom: 20rpx;">
					<my-img-y v-for="item in lastVideoCValue" :key="item?.id" :urlId="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:sort="item?.type"></my-img-y>
				</view>

			</view>


		</scroll-view>


		<!-- 综艺 -->
		<scroll-view v-if="currentTab == 3" @scroll="SwiperScrollTop" @scrolltolower="onBottumLoadingD"
			class="swiper-topic-list" scroll-y="true">
			<view class="swiper-item">

				<view class="swiper-item">
					<!-- 轮播图 -->
					<my-swiper :list="swiperListDImg" :options="swiperOptions" />

					<!-- 导航 -->
					<my-scroll-navbar></my-scroll-navbar>

					<!-- 今日推荐·即将上线 -->
					<max-title-min title="今日新片推荐" url="/pages/tags/tags" text="最新"
						icon="calendar-filled"></max-title-min>
					<view class="image-eight-Three">
						<my-img-y-Three class="item" v-for="item in newDateDaysC" :key="item?.id"
							:images="item?.imageUrl" :tags="item?.tags" :name="item?.name" :bifen="item?.bifen"
							:biao="item?.biao" :episode="item?.episode" :episodes="item?.episodes"
							:urlId="item?.id"></my-img-y-Three>
					</view>

					<!-- 用户人性推荐 -->
					<view class="image-eight" style="padding-top: 0; padding-bottom: 10rpx;">
						<my-img-x v-for="item in UserDBannerValue" :images="item?.imageUrl" :tags="item?.tags"
							:name="item?.name" :bifen="item?.bifen" :biao="item?.biao" :key="item?.id" :urlId="item?.id"
							:episode="item?.episode" :episodes="item?.episodes"></my-img-x>
					</view>


					<!-- 必看·爆款 第一波 -->
					<view v-for="(item , index ) in SelectionSelectDavalue">
						<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
						<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayDa[index]?.list"
							navUrl="/pages/play/play?id="></my-scroll>
						<view class="image-eight-Three" v-if="item?.scroll ==2">
							<my-img-y-Three class="item" v-for="video  in SelectVideosArrayDa[index]?.list"
								:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
								:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
								:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
								:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
								:urlId="video.collection[0]?.id"></my-img-y-Three>
						</view>

					</view>

					<!-- 最后底部触发 -->
					<view class="image-eight" style="padding-bottom: 20rpx;">
						<my-img-y v-for="item in lastVideoDValue" :key="item?.id" :urlId="item?.id"
							:images="item?.imageUrl" :tags="item?.tags" :name="item?.name" :bifen="item?.bifen"
							:biao="item?.biao" :sort="item?.type"></my-img-y>
					</view>

				</view>
			</view>

		</scroll-view>




		<!-- 动画 -->

		<scroll-view v-if="currentTab == 4" @scroll="SwiperScrollTop" @scrolltolower="onBottumLoadingE"
			class="swiper-topic-list" scroll-y="true">
			<view class="swiper-item">
				<!-- 轮播图 -->
				<my-swiper :list="swiperListEImg" :options="swiperOptions" />

				<!-- 导航 -->
				<my-scroll-navbar></my-scroll-navbar>

				<!-- 今日推荐·即将上线 -->
				<max-title-min title="今日新片推荐" url="/pages/tags/tags" text="最新" icon="calendar-filled"></max-title-min>
				<view class="image-eight-Three">
					<my-img-y-Three class="item" v-for="item in newDateDaysD" :key="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:episode="item?.episode" :episodes="item?.episodes" :urlId="item?.id"></my-img-y-Three>
				</view>

				<!-- 用户人性推荐 -->
				<view class="image-eight" style="padding-top: 0; padding-bottom: 10rpx;">
					<my-img-x v-for="item in UserEBannerValue" :images="item?.imageUrl" :tags="item?.tags"
						:name="item?.name" :bifen="item?.bifen" :biao="item?.biao" :key="item?.id"
						:episode="item?.episode" :episodes="item?.episodes" :urlId="item?.id"></my-img-x>
				</view>


				<!-- 必看·爆款 第一波 -->
				<view v-for="(item , index ) in SelectionSelectEavalue">
					<max-title-min :title="item?.content" :isIcon="false"></max-title-min>
					<my-scroll :colIf=2 v-if="item?.scroll ==1" :scroll="SelectVideosArrayEa[index]?.list"
						navUrl="/pages/play/play?id="></my-scroll>
					<view class="image-eight-Three" v-if="item?.scroll ==2">
						<my-img-y-Three class="item" v-for="video  in SelectVideosArrayEa[index]?.list"
							:key="video.collection[0]?.id" :images="video.collection[0]?.imageUrl"
							:tags="video.collection[0]?.tags" :name="video.collection[0]?.name"
							:bifen="video.collection[0]?.bifen" :biao="video.collection[0]?.biao"
							:episode="video.collection[0]?.episode" :episodes="video.collection[0]?.episodes"
							:urlId="video.collection[0]?.id"></my-img-y-Three>
					</view>

				</view>

				<!-- 最后底部触发 -->
				<view class="image-eight" style="padding-bottom: 20rpx;">
					<my-img-y v-for="item in lastVideoEValue" :key="item?.id" :urlId="item?.id" :images="item?.imageUrl"
						:tags="item?.tags" :name="item?.name" :bifen="item?.bifen" :biao="item?.biao"
						:sort="item?.type"></my-img-y>
				</view>

			</view>

		</scroll-view>


	</view>
</template>

<script setup>
	import {
		ref,
		computed,
		watch
	} from 'vue';
	import {
		onReachBottom
	} from '@dcloudio/uni-app';
	defineEmits(['TagIndex']);
	import {
		swiperImg,

		WatchSelect,
		SelectionSelect,
		SelectionSelectVideo,
		swiperimgsBanner,
		lastVideo,
		CollectionNav,
		CollectionYurt,
		CollectionYear,
		CollectionTags,
		TagsYearYurt
	} from '@/API/indexApis.js';
	const pageScrollTop = ref(1) //头部变色初始值
	const tabCurrent = ref('tabNum1'); //导航栏参数
	const currentTab = ref(0); //头部导航栏参数
	const scrollLeft = ref(0); //头部导航栏参数
	const collectioNavValue = ref([]); //头部导航
	const collectionTagsValue = ref([]); //选片神奇 标签
	const collectionYearValue = ref([]); //选片神奇 年份
	const collectionYurtValue = ref([]); //选片神奇 区域
	const UserABannerValue = ref([]) // 个性推荐
	const UserBBannerValue = ref([]) // 个性推荐
	const UserCBannerValue = ref([]) // 个性推荐
	const UserDBannerValue = ref([]) // 个性推荐
	const UserEBannerValue = ref([]) // 个性推荐

	// 推荐轮播图数据
	const swiperListAImg = ref([]); //首页轮播图
	const swiperListBImg = ref([]); //电影轮播图
	const swiperListCImg = ref([]); //剧集轮播图
	const swiperListDImg = ref([]); //综艺轮播图
	const swiperListEImg = ref([]); //动漫轮播图
	const WatchSelectImgvalue = ref([]); //推荐观看记录

	const SelectionSelectAvalue = ref([]) // 推荐标题标签导航
	const SelectionSelectBvalue = ref([]) // 推荐标题标签导航
	const SelectionSelectCvalue = ref([]) // 推荐标题标签导航

	const SelectionSelectAavalue = ref([]) // 电影标题标签导航
	const SelectionSelectBbvalue = ref([]) // 电影标题标签导航
	const SelectionSelectCcvalue = ref([]) // 电影标题标签导航

	const SelectionSelectCavalue = ref([]) // 剧集标题标签导航
	const SelectionSelectCbvalue = ref([]) // 剧集标题标签导航
	const SelectionSelectCccvalue = ref([]) // 剧集标题标签导航

	const SelectionSelectDavalue = ref([]) // 综艺标题标签导航

	const SelectionSelectEavalue = ref([]) // 动画标题标签导航

	const SelectionSelectBollean = ref(1); // 推荐标题标签触底刷新初始值
	const SelectVideosArray = ref([]); //推荐页面第一波标题导航获取的内容数组
	const SelectVideosArrayB = ref([]); //推荐页面第二波标题导航获取的内容数组
	const SelectVideosArrayC = ref([]); //推荐页面第三波标题导航获取的内容数组

	const SelectionSelectBolleanB = ref(1); // 电影标题标签触底刷新初始值
	const SelectVideosArraya = ref([]); //电影页面第一波标题导航获取的内容数组
	const SelectVideosArrayBb = ref([]); //电影页面第二波标题导航获取的内容数组
	const SelectVideosArrayCc = ref([]); //电影页面第三波标题导航获取的内容数组

	const SelectionSelectBolleanC = ref(1); // 剧集标题标签触底刷新初始值
	const SelectVideosArrayCa = ref([]); //剧集页面第一波标题导航获取的内容数组
	const SelectVideosArrayCb = ref([]); //剧集页面第二波标题导航获取的内容数组
	const SelectVideosArrayCcc = ref([]); //剧集页面第三波标题导航获取的内容数组

	const SelectVideosArrayDa = ref([]); //综艺页面第一波标题导航获取的内容数组

	const SelectVideosArrayEa = ref([]); //动画页面第一波标题导航获取的内容数组

	const swiperimgsBannerValue = ref([]); // 推荐带小图的轮播图
	const swiperimgsBannerBValue = ref([]); // 电影带小图的轮播图
	const swiperimgsBannerCValue = ref([]); // 剧集带小图的轮播图

	const lastVideoAValue = ref([]); // 推荐页面触底刷新初始值
	const lastVideoANextPage = ref(1); // 推荐页面触底刷新下一页

	const lastVideoBValue = ref([]); // 电影页面触底刷新初始值
	const lastVideoBNextPage = ref(1); // 电影页面触底刷新下一页

	const lastVideoCValue = ref([]); // 剧集页面触底刷新初始值
	const lastVideoCNextPage = ref(1); // 剧集页面触底刷新下一页

	const lastVideoDValue = ref([]); // 综艺页面触底刷新初始值
	const lastVideoDNextPage = ref(1); // 综艺页面触底刷新下一页

	const lastVideoEValue = ref([]); // 动画页面触底刷新初始值
	const lastVideoENextPage = ref(1); // 动画页面触底刷新下一页


	const newDateDaysA = ref([]); //电影今日推荐
	const newDateDaysB = ref([]); //剧集今日推荐
	const newDateDaysC = ref([]); //综艺今日推荐
	const newDateDaysD = ref([]); //动画今日推荐

	const tagsYearYurtValue = ref([]); //电影选片神奇
	const tagsYearYurtValueB = ref([]); //剧集选片神奇

	const tagsindex = ref(0);
	const yearindex = ref(null);
	const yurtindex = ref(0);


	// 头部导航
	const collectioNavgation = async () => {
		let res = await CollectionNav();
		console.log("CollectionNav：", res);
		collectioNavValue.value = res;
	}
	// 头部导航
	collectioNavgation();

	// 推荐轮播图数据
	const SwiperlistAImg = async () => {
		let res = await swiperimgsBanner(0, '');
		console.log("swiperImg：", res);
		swiperListAImg.value = res.data.list;
	}
	// 推荐轮播图数据
	SwiperlistAImg();

	// 推荐观看记录
	const WatchSelectFunction = async () => {
		// #ifdef MP-WEIXIN
		let user = uni.getStorageSync("user");
		// #endif
		let res = await WatchSelect(user.id);
		console.log("WatchSelect：", res);
		WatchSelectImgvalue.value = res;
	}
	// 推荐观看记录
	// WatchSelectFunction();

	// 推荐个性化
	const UserABannerFunction = async () => {
		let res = await swiperimgsBanner(0, '');
		UserABannerValue.value = res.data.list;
	}
	// 推荐带小图的轮播图
	UserABannerFunction();

	// 推荐A导航
	const SelectionSelectAFunction = async () => {
		let resA = await SelectionSelect(1, 4, 5);
		// console.log("SelectionSelectA：", resA);
		SelectionSelectAvalue.value = resA.data.list;
		let videos = resA.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("for循环的结果：", video.data);
			SelectVideosArray.value.push(video.data);
		}
		console.log("SelectVideosArray的结果value[0]：", SelectVideosArray.value[0]);
		// 	console.log("SelectVideosArray的结果value[0].list：", SelectVideosArray.value[0].list);
	}
	// 推荐B导航
	const SelectionSelectBFunction = async () => {
		let resB = await SelectionSelect(2, 4, 5);
		// console.log("SelectionSelectB：", resB);
		SelectionSelectBvalue.value = resB.data.list;
		let videos = resB.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("forB循环的结果：", video.data);
			SelectVideosArrayB.value.push(video.data);
		}
	}
	// 推荐C导航
	const SelectionSelectCFunction = async () => {
		let resC = await SelectionSelect(2, 8, 5);
		// console.log("SelectionSelectC：", resC);
		SelectionSelectCvalue.value = resC.data.list;
		let videos = resC.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("forC循环的结果：", video.data);
			SelectVideosArrayC.value.push(video.data);
		}
	}
	// 推荐导航
	SelectionSelectAFunction();

	// 推荐带小图的轮播图
	const swiperimgsBannerFunction = async () => {
		let res = await swiperimgsBanner(0, 'bifen');
		swiperimgsBannerValue.value = res.data.list;
	}
	// 推荐带小图的轮播图
	swiperimgsBannerFunction();


	// 推荐页面触底刷新数据函数
	const lastVideoFunction = async (pageNum, type) => {
		let res = await lastVideo(pageNum, type);
		let video = res.data.list;
		lastVideoAValue.value = lastVideoAValue.value.concat(video);
		for (let i = 0; i < lastVideoAValue.value.length; i++) {
			if (lastVideoAValue.value[i].type == 1) {
				lastVideoAValue.value[i].type = '电影'
			} else if (lastVideoAValue.value[i].type == 2) {
				lastVideoAValue.value[i].type = '剧集'
			} else if (lastVideoAValue.value[i].type == 3) {
				lastVideoAValue.value[i].type = '综艺'
			} else if (lastVideoAValue.value[i].type == 4) {
				lastVideoAValue.value[i].type = '动漫'
			}

		}
		console.log("lastVideoAValue:{}", res)
		lastVideoANextPage.value = res.data.nextPage
	}

	// 推荐页面触底函数
	function onBottumLoadingA() {
		if (SelectionSelectBollean.value == 1) {
			console.log("推荐触底了第一次一次性执行")
			SelectionSelectBFunction();
			SelectionSelectBollean.value++;
		} else if (SelectionSelectBollean.value == 2) {
			console.log("推荐触底了第二次一次性执行")
			SelectionSelectCFunction();
			SelectionSelectBollean.value++;
		} else if (SelectionSelectBollean.value > 2) {
			if (lastVideoANextPage.value > 0) {
				console.log("触底了无数次循环")
				console.log(SelectionSelectBollean.value)
				// 推荐触底刷新
				lastVideoFunction(lastVideoANextPage.value, 0);
			}

		}

	}


	// ----------------------推荐页面函数结束---------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	// ----------------------电影页面函数开始---------------------//

	// 电影轮播图数据
	const SwiperlistBImg = async () => {
		let res = await swiperimgsBanner(1, '');
		let video = await swiperImg(9, 1);
		console.log("swiperBImg：", res);
		swiperListBImg.value = res.data.list;
		newDateDaysA.value = video.data.list
	}

	// 电影个性化
	const UserBBannerFunction = async () => {
		let res = await swiperimgsBanner(1, '');
		UserBBannerValue.value = res.data.list;
	}

	// 电影A导航
	const SelectionSelectAaFunction = async () => {
		let resA = await SelectionSelect(1, 4, 1);
		// console.log("SelectionSelectA：", resA);
		SelectionSelectAavalue.value = resA.data.list;
		let videos = resA.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("for循环的结果：", video.data);
			SelectVideosArraya.value.push(video.data);
		}
		// 	console.log("SelectVideosArray的结果value[0]：", SelectVideosArray.value[0]);
		// 	console.log("SelectVideosArray的结果value[0].list：", SelectVideosArray.value[0].list);
	}
	// 电影B导航
	const SelectionSelectBbFunction = async () => {
		let resB = await SelectionSelect(2, 4, 1);
		// console.log("SelectionSelectB：", resB);
		SelectionSelectBbvalue.value = resB.data.list;
		let videos = resB.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("forB循环的结果：", video.data);
			SelectVideosArrayBb.value.push(video.data);
		}
	}
	// 电影C导航
	const SelectionSelectCcFunction = async () => {
		let resC = await SelectionSelect(2, 8, 1);
		// console.log("SelectionSelectC：", resC);
		SelectionSelectCcvalue.value = resC.data.list;
		let videos = resC.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("forC循环的结果：", video.data);
			SelectVideosArrayCc.value.push(video.data);
		}
	}


	// 电影带小图的轮播图
	const swiperimgsBannerBFunction = async () => {
		let res = await swiperimgsBanner(1, 'bifen');
		swiperimgsBannerBValue.value = res.data.list;
	}


	// 电影页面触底刷新数据函数
	const lastVideoBFunction = async (pageNum, type) => {
		let res = await lastVideo(pageNum, type);
		let video = res.data.list;
		lastVideoBValue.value = lastVideoBValue.value.concat(video);
		for (let i = 0; i < lastVideoBValue.value.length; i++) {
			if (lastVideoBValue.value[i].type == 1) {
				lastVideoBValue.value[i].type = '电影'
			} else if (lastVideoBValue.value[i].type == 2) {
				lastVideoBValue.value[i].type = '剧集'
			} else if (lastVideoBValue.value[i].type == 3) {
				lastVideoBValue.value[i].type = '综艺'
			} else if (lastVideoBValue.value[i].type == 4) {
				lastVideoBValue.value[i].type = '动漫'
			}

		}
		console.log("lastVideoBValue:{}", res)
		lastVideoBNextPage.value = res.data.nextPage
	}

	// 选片神奇 区域
	const collectioYurtFunction = async () => {
		let res = await CollectionYurt();
		// console.log("选片神奇：", res);
		collectionYurtValue.value = res;
	}

	// 选片神奇 年份
	const collectioYearFunction = async () => {
		let res = await CollectionYear();
		// console.log("选片神奇：", res);
		collectionYearValue.value = res;
	}

	// 选片神奇 标签
	const collectioTagFunction = async () => {
		let res = await CollectionTags();
		// console.log("选片神奇：", res);
		collectionTagsValue.value = res;
	}

	// 选片神奇执行获取内容函数
	const TagsYearYurtFunction = async (type, sortId, yurt, year) => {
		let res = await TagsYearYurt(type, sortId, yurt, year);
		console.log("选片神奇结果：", res);
		if (type == 1) {
			tagsYearYurtValue.value = res.list;
			console.log("赋给电影")
		}
		if (type == 2) {
			tagsYearYurtValueB.value = res.list;
			console.log("赋给剧集")
		}

	}

	function tagsClick(e) {
		// console.log("item-sortId:",e.item.sortId)
		console.log("tags点击按钮：", e);
		tagsindex.value = e.item.sortId;
		console.log("tagsClick:", tagsindex.value);
		console.log("tagsClick:", yearindex.value);
		console.log("tagsClick:", yurtindex.value);
		TagsYearYurtFunction(1, tagsindex.value, yurtindex.value, yearindex.value);

	}

	function yearClick(e) {
		// console.log("year:", e);
		yearindex.value = e.item.name;
		console.log("yearClick:", tagsindex.value);
		console.log("yearClick:", yearindex.value);
		console.log("yearClick:", yurtindex.value);

		TagsYearYurtFunction(1, tagsindex.value, yurtindex.value, yearindex.value);
	}

	function yurtClick(e) {
		// console.log("yurt:", e);
		yurtindex.value = e.item.typeId;
		console.log("yurtClick:", tagsindex.value);
		console.log("yurtClick:", yearindex.value);
		console.log("yurtClick:", yurtindex.value);

		TagsYearYurtFunction(1, tagsindex.value, yurtindex.value, yearindex.value);
	}



	// 电影页面触底函数
	function onBottumLoadingB() {
		if (SelectionSelectBolleanB.value == 1) {
			console.log("推荐触底了第一次一次性执行")
			SelectionSelectBbFunction();
			SelectionSelectBolleanB.value++;
		} else if (SelectionSelectBolleanB.value == 2) {
			console.log("推荐触底了第二次一次性执行")
			SelectionSelectCcFunction();
			// 电影带小图的轮播图
			swiperimgsBannerBFunction();
			SelectionSelectBolleanB.value++;
		} else if (SelectionSelectBolleanB.value > 2) {
			if (lastVideoBNextPage.value > 0) {
				console.log("lastVideoBFunction触底了无数次循环")
				console.log(SelectionSelectBollean.value)
				// 推荐触底刷新
				lastVideoBFunction(lastVideoBNextPage.value, 1);
			}

		}

	}




	// ----------------------电影页面函数结束---------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	// ----------------------剧集页面函数开始--------------------//


	// 剧集轮播图数据
	const SwiperlistCImg = async () => {
		let res = await swiperimgsBanner(2, '');
		let video = await swiperImg(9, 2);
		console.log("swiperCImg：", res);
		swiperListCImg.value = res.data.list;
		newDateDaysB.value = video.data.list;
	}


	// 剧集个性化
	const UserCBannerFunction = async () => {
		let res = await swiperimgsBanner(2, '');
		UserCBannerValue.value = res.data.list;
	}


	// 剧集A导航
	const SelectionSelectCaFunction = async () => {
		let resA = await SelectionSelect(1, 4, 2);
		// console.log("SelectionSelectA：", resA);
		SelectionSelectCavalue.value = resA.data.list;
		let videos = resA.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("for循环的结果：", video.data);
			SelectVideosArrayCa.value.push(video.data);
		}
		// 	console.log("SelectVideosArray的结果value[0]：", SelectVideosArray.value[0]);
		// 	console.log("SelectVideosArray的结果value[0].list：", SelectVideosArray.value[0].list);
	}
	// 剧集B导航
	const SelectionSelectCbFunction = async () => {
		let resB = await SelectionSelect(2, 4, 2);
		// console.log("SelectionSelectB：", resB);
		SelectionSelectCbvalue.value = resB.data.list;
		let videos = resB.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("forB循环的结果：", video.data);
			SelectVideosArrayCb.value.push(video.data);
		}
	}
	// 剧集C导航
	const SelectionSelectCccFunction = async () => {
		let resC = await SelectionSelect(2, 8, 2);
		// console.log("SelectionSelectC：", resC);
		SelectionSelectCccvalue.value = resC.data.list;
		let videos = resC.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("forC循环的结果：", video.data);
			SelectVideosArrayCcc.value.push(video.data);
		}
	}


	// 剧集带小图的轮播图
	const swiperimgsBannerCFunction = async () => {
		let res = await swiperimgsBanner(2, 'bifen');
		swiperimgsBannerCValue.value = res.data.list;
	}


	function tagsClickB(e) {
		// console.log("item-sortId:",e.item.sortId)
		console.log("tags点击按钮：", e);
		tagsindex.value = e.item.sortId;
		console.log("tagsClick:", tagsindex.value);
		console.log("tagsClick:", yearindex.value);
		console.log("tagsClick:", yurtindex.value);
		TagsYearYurtFunction(2, tagsindex.value, yurtindex.value, yearindex.value);

	}

	function yearClickB(e) {
		// console.log("year:", e);
		yearindex.value = e.item.name;
		console.log("yearClick:", tagsindex.value);
		console.log("yearClick:", yearindex.value);
		console.log("yearClick:", yurtindex.value);

		TagsYearYurtFunction(2, tagsindex.value, yurtindex.value, yearindex.value);
	}

	function yurtClickB(e) {
		// console.log("yurt:", e);
		yurtindex.value = e.item.typeId;
		console.log("yurtClick:", tagsindex.value);
		console.log("yurtClick:", yearindex.value);
		console.log("yurtClick:", yurtindex.value);

		TagsYearYurtFunction(2, tagsindex.value, yurtindex.value, yearindex.value);
	}


	// 剧集页面触底刷新数据函数
	const lastVideoCFunction = async (pageNum, type) => {
		let res = await lastVideo(pageNum, type);
		let video = res.data.list;
		lastVideoCValue.value = lastVideoCValue.value.concat(video);
		for (let i = 0; i < lastVideoCValue.value.length; i++) {
			if (lastVideoCValue.value[i].type == 1) {
				lastVideoCValue.value[i].type = '电影'
			} else if (lastVideoCValue.value[i].type == 2) {
				lastVideoCValue.value[i].type = '剧集'
			} else if (lastVideoCValue.value[i].type == 3) {
				lastVideoCValue.value[i].type = '综艺'
			} else if (lastVideoCValue.value[i].type == 4) {
				lastVideoCValue.value[i].type = '动漫'
			}

		}
		console.log("lastVideoCValue:{}", res)
		lastVideoCNextPage.value = res.data.nextPage
	}

	// 剧集页面触底函数
	function onBottumLoadingC() {
		if (SelectionSelectBolleanC.value == 1) {
			console.log("推荐触底了第一次一次性执行")
			SelectionSelectCbFunction();
			SelectionSelectBolleanC.value++;
		} else if (SelectionSelectBolleanC.value == 2) {
			console.log("推荐触底了第二次一次性执行")
			SelectionSelectCccFunction();
			// 剧集带小图的轮播图
			swiperimgsBannerCFunction();
			SelectionSelectBolleanC.value++;
		} else if (SelectionSelectBolleanC.value > 2) {
			if (lastVideoCNextPage.value > 0) {
				console.log("lastVideoCFunction触底了无数次循环")
				console.log(SelectionSelectBolleanC.value)
				// 剧集触底刷新
				lastVideoCFunction(lastVideoCNextPage.value, 2);
			}

		}

	}



	// ----------------------剧集页面函数结束---------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	// ----------------------综艺页面函数开始---------------------//



	// 综艺轮播图数据
	const SwiperlistDImg = async () => {
		let res = await swiperimgsBanner(3, '');
		let video = await swiperImg(9, 3);
		console.log("swiperDImg：", res);
		swiperListDImg.value = res.data.list;
		newDateDaysC.value = video.data.list;
	}


	// 综艺个性化
	const UserDBannerFunction = async () => {
		let res = await swiperimgsBanner(3, '');
		UserDBannerValue.value = res.data.list;
	}


	// 综艺A导航
	const SelectionSelectDaFunction = async () => {
		let resA = await SelectionSelect(1, 10, 3);
		// console.log("SelectionSelectA：", resA);
		SelectionSelectDavalue.value = resA.data.list;
		let videos = resA.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("for循环的结果：", video.data);
			SelectVideosArrayDa.value.push(video.data);
		}
		// 	console.log("SelectVideosArray的结果value[0]：", SelectVideosArray.value[0]);
		// 	console.log("SelectVideosArray的结果value[0].list：", SelectVideosArray.value[0].list);
	}


	// 综艺页面触底刷新数据函数
	const lastVideoDFunction = async (pageNum, type) => {
		let res = await lastVideo(pageNum, type);
		let video = res.data.list;
		lastVideoDValue.value = lastVideoDValue.value.concat(video);
		for (let i = 0; i < lastVideoDValue.value.length; i++) {
			if (lastVideoDValue.value[i].type == 3) {
				lastVideoDValue.value[i].type = '综艺'
			}

		}
		console.log("lastVideoDValue:{}", res)
		lastVideoDNextPage.value = res.data.nextPage
	}

	// 综艺页面触底函数
	function onBottumLoadingD() {

		if (lastVideoDNextPage.value > 0) {
			console.log("lastVideoDFunction触底了无数次循环")
			console.log(SelectionSelectBolleanC.value)
			// 综艺触底刷新
			lastVideoDFunction(lastVideoDNextPage.value, 3);
		}


	}




	// ----------------------综艺页面函数结束---------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	// ----------------------动画页面函数开始---------------------//



	// 动画轮播图数据
	const SwiperlistEImg = async () => {
		let res = await swiperimgsBanner(4, '');
		let video = await swiperImg(9, 4);
		console.log("swiperEImg：", res);
		swiperListEImg.value = res.data.list;
		newDateDaysD.value = video.data.list;
	}

	// 动画个性化
	const UserEBannerFunction = async () => {
		let res = await swiperimgsBanner(4, '');
		UserEBannerValue.value = res.data.list;
	}


	// 动画A导航
	const SelectionSelectEaFunction = async () => {
		let resA = await SelectionSelect(1, 10, 4);
		// console.log("SelectionSelectA：", resA);
		SelectionSelectEavalue.value = resA.data.list;
		let videos = resA.data.list;
		for (let i = 0; i < videos.length; i++) {
			let next = 9;
			if (videos[i].scroll == 1) {
				next = 18
			}
			let video = await SelectionSelectVideo(1, next, videos[i].type, videos[i].sortId);
			// console.log("for循环的结果：", video.data);
			SelectVideosArrayEa.value.push(video.data);
		}
		// 	console.log("SelectVideosArray的结果value[0]：", SelectVideosArray.value[0]);
		// 	console.log("SelectVideosArray的结果value[0].list：", SelectVideosArray.value[0].list);
	}


	// 动画页面触底刷新数据函数
	const lastVideoEFunction = async (pageNum, type) => {
		let res = await lastVideo(pageNum, type);
		let video = res.data.list;
		lastVideoEValue.value = lastVideoEValue.value.concat(video);
		for (let i = 0; i < lastVideoEValue.value.length; i++) {
			if (lastVideoEValue.value[i].type == 4) {
				lastVideoEValue.value[i].type = '动画'
			}

		}
		console.log("lastVideoDValue:{}", res)
		lastVideoENextPage.value = res.data.nextPage
	}

	// 动画页面触底函数
	function onBottumLoadingE() {
		if (lastVideoENextPage.value > 0) {
			// 动画触底刷新
			lastVideoEFunction(lastVideoENextPage.value, 4);
		}


	}


	// ----------------------动画页面函数结束---------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	//---------------------------------------------------------//
	// ------------------------通用函数开始----------------------//


	// 轮播图样式
	const swiperOptions = ref({
		showTitle: true,
		titlePosition: 'overlay',
		showOverlay: false,
		customIndicator: true,
		overlayGradient: true,
		titleStyle: {
			background: 'linear-gradient(to top, rgba(0,0,0,0.9), transparent)',
			padding: '20rpx 40rpx'
		}
	});

	// 头部搜索框点击跳转搜索页面
	function searchTop() {
		console.log("可以了")
		uni.navigateTo({
			url: "/pages/search/search"
		})
	}
	// 导航栏滑动函数
	function swichMenu(id) {
		currentTab.value = id
		
	switch (id) {
			case 1:
				console.log("电影页面");
				if (!swiperListBImg.value[0]) {
					console.log("电影第一次执行了")
					// 电影轮播图数据
					SwiperlistBImg();

					// 电影导航
					SelectionSelectAaFunction();

					// 选片神奇 标签
					collectioTagFunction();
					collectioYearFunction();
					collectioYurtFunction();
					TagsYearYurtFunction(1, 0, 0, null);

					// 个性化
					UserBBannerFunction();
				}


				break;
			case 2:
				console.log("剧集页面");
				if (!swiperListCImg.value[0]) {
					console.log("剧集第一次执行了")
					// 剧集轮播图数据
					SwiperlistCImg();

					// 剧集导航
					SelectionSelectCaFunction();

					// 选片神奇 标签
					collectioTagFunction();
					collectioYearFunction();
					collectioYurtFunction();
					TagsYearYurtFunction(2, 0, 0, null);

					// 个性化
					UserCBannerFunction();

				}

				break;
			case 3:
				console.log("综艺页面");
				if (!swiperListDImg.value[0]) {
					console.log("综艺第一次执行了")
					// 剧集轮播图数据
					SwiperlistDImg();

					// 剧集导航
					SelectionSelectDaFunction();

					// 个性化
					UserDBannerFunction();
				}
				break;
			case 4:
				console.log("动画页面");
				if (!swiperListEImg.value[0]) {
					console.log("动画第一次执行了")
					// 剧集轮播图数据
					SwiperlistEImg();

					// 剧集导航
					SelectionSelectEaFunction();

					// 个性化
					UserEBannerFunction();
				}
				break;
			default:
				console.log("未知页面");
		}

		// 滑动swiper后，每个选项距离其父元素最左侧的距离
		scrollLeft.value = 0;
		for (let i = 0; i < id; i++) {
			scrollLeft.value += 60
			console.log(scrollLeft.value, 60, id)
		}
	};

	// 头部变色计算样式类
	const topNav1 = computed(() => {
		const r = pageScrollTop.value / 100
		return {
			class: r >= 0.85 ? 'style2' : ''
		}
	})

	// 头部变色计算背景样式
	const topNav = computed(() => {
		const r = pageScrollTop.value / 150
		return {
			style: `background-color: rgba(0, 0, 0, ${r >= 1 ? 1 : r});`
		}
	})

	// 头部变色页面滚动监听而追渐变色
	function SwiperScrollTop(e) {
		// console.log(e.detail.scrollTop)
		pageScrollTop.value = Math.floor(e.detail.scrollTop);
	}
</script>


<style scoped lang="scss">
	@import '@/uni.scss';

	.body-view {
		width: 100%;
		overflow: hidden;
		display: flex;
		align-items: center;
		justify-content: center;

		.head-box {
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			height: 210rpx;
			padding-top: var(--status-bar-height);
			z-index: 10;
			background-color: rgba(66, 185, 131, 0);
			color: rgba(255, 255, 255, 0.8);
			z-index: 100;
			// display: flex;
			// flex-direction: column;
			// align-items: center;
			// justify-content: center;
		}
	}


	.top-menu-view ::-webkit-scrollbar {
		width: 0;
		height: 0;
		color: transparent;
		display: none;
	}

	.body-view-scroll {
		display: flex;
		// position: fixed;
		align-items: center;
		justify-content: start;
		position: relative;
		width: 100%;
		z-index: 10;
		top: 50rpx;
		padding-left: 30rpx;

		.uni-mt-10 {
			width: 55%;
			padding: 0 20rpx;
			margin-left: 40rpx;
			height: 65rpx;
			line-height: 70rpx;
			background: #464646;
			border-radius: 100rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #969696;
			font-size: 24rpx;
		}

		.body-image {
			width: 70rpx;
			height: 70rpx;
		}

	}

	.top-menu-view {
		display: flex;
		z-index: 100;
		padding-top: 35rpx;
		// left: 0;
		white-space: nowrap;
		width: 100%;
		// background-color: #fceeee;
		height: 86rpx;
		line-height: 86rpx;
		// border-top: 1rpx solid #d8dbe6;

		.menu-topic-view {
			display: inline-block;
			white-space: nowrap;
			height: 86rpx;
			position: relative;

			.menu-topic-text {
				margin-left: 10rpx;
				font-size: 30rpx;
				// font-size: 28rpx;
				// color: #303133;
				color: $App-max-text-color;
				padding: 10rpx 40rpx;
				// padding: 10rpx 40rpx;
				font-weight: 500;
			}

			.menu-topic-bottom {
				position: absolute;
				bottom: 0;
				width: 100%;

				.menu-topic-bottom-color {
					width: 40rpx;
					height: 4rpx;
				}
			}

			.menu-topic-act .menu-topic-bottom {
				display: flex;
				justify-content: center;
			}

			.menu-topic-act .menu-topic-text {
				color: #ff0000;
			}


			.menu-topic-act .menu-topic-bottom-color {
				background: #ff0000;
			}
		}
	}

	.swiper-topic-list {
		width: 100%;
		height: 100vh;
	}

	/* 隐藏滚动条，但依旧具备可以滚动的功能 */
	.uni-scroll-view::-webkit-scrollbar {
		display: none;
	}


	.image-eight {
		padding: 30rpx;
		display: grid;
		gap: 15rpx;
		grid-template-columns: repeat(2, 1fr);
	}

	.image-eight-Three {
		padding: 0 30rpx;
		display: grid;
		gap: 15rpx;
		grid-template-columns: repeat(3, 1fr);

		.item {
			overflow: hidden;
			/* 防止内容溢出 */
			position: relative;
			width: 100%;
			/* 图片宽度填充整个容器 */
			height: auto;
			/* 根据宽度自动调整高度 */
			display: block;
			/* 移除图片下方默认的空白间隙 */
			object-fit: cover;
			/* 保证图片完全覆盖容器，可能会裁剪图片 */
		}
	}
</style>